// 预加载文件，判断是否是electron
const IS_ELECTRON = window.navigator.userAgent.indexOf("Electron") >= 0;

if (IS_ELECTRON) {
    try {
        window.fs = require("fs");
        window.electron = require("electron");
    } catch (e) {
        alert(e);
    }
}